<!-- 终端详情 -->
<template>
  <view class="container">
    <view class="top-bg">
      <u-sticky>
        <view class="return" @click="goToBack()">
          <u-icon name="arrow-left" color="#ffffff " bold="true" size="38"></u-icon>
        </view>
        终端详情
      </u-sticky>
    </view>
    <view style="position: absolute; top: 180rpx; left: 50%; transform: translate(-50%, 0px);width: 92%;">
      <terminal-detail-component :terminalName="selectData.terminalName" :terminalStatus="selectData.terminalStatus" :terminalId="selectData.terminalId" :equList="selectData.equipmentList"></terminal-detail-component>
    </view>
  </view>
</template>

<script>
import terminalDetailComponent from './modules/terminalDetailComponent.vue'
export default {
  components: { terminalDetailComponent },
  data() {
    return {
      selectData:{}
    }
  },
  watch: {
    selectData: {
      handler: function (val) { 
        console.log(val,'val---监听跳转参数selectData')
        // if(val){
        // }
      },
      immediate: true,
      deep: true
    }
  },
  onLoad(query) {
    console.log(query,'query') 
    this.selectData = JSON.parse(query.selectData)
  },
  methods: {
    goToBack() {
      uni.navigateBack()
    },
  }
}
</script>

<style lang="scss" scoped>
.container {
  // height: calc(100vh - 220rpx);
  height: 100vh;
  overflow: scroll;
  white-space: inherit;
  font-family: PingFang-SC, PingFang-SC;
  ::v-deep .van-dropdown-menu__item {
    background: #2769f7;
    justify-content: flex-start;
    color: #fff;
    padding-left: 16rpx;
    .van-dropdown-menu__title {
      color: #fff;
    }
  }
  .top-bg {
    width: 100%;
    height: 330rpx;
    background: #2769f7;
    border-radius: 0rpx 0rpx 140rpx 140rpx;
    padding-top: 104rpx;
    text-align: center;
    font-weight: 600;
    font-size: 40rpx;
    color: #ffffff;
    letter-spacing: 4rpx;
    position: relative;
    .return {
      position: absolute;
      left: 32rpx;
      margin-top: 8rpx;
    }
    .listContent {
      height: calc(100vh - 382rpx);
      overflow-y: scroll;
    }
  }
}
</style>